package com.akkainaction.mailbox.config;

import akka.actor.ActorRef;
import akka.actor.ActorSystem;
import akka.actor.Props;
import com.akkainaction.mailbox.config.actor.CaActor;
import com.akkainaction.mailbox.config.message.ControlMsg;

import java.util.Arrays;
import java.util.List;

public class TestCaActor {

    public static void main(String[] args) {
        ActorSystem system = ActorSystem.create("sys");
        ActorRef caActor = system.actorOf(Props.create(CaActor.class), "caActor");
        List<Object> messageList = Arrays.asList("JAVA", "C#", new ControlMsg("CPP"), "GO", "SCALA");
        for (Object message : messageList) {
            caActor.tell(message, ActorRef.noSender());
        }
    }
}
